<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>获取值的类型</title>
</head>
<body>
    <script>
        var name1 = '10';
        console.log('name1的类型为:' + typeof name1 + '类型');
        var name2 = 10;
        console.log('name2的类型为:' + typeof name2 + '类型');
        var name3 = true || false;
        console.log('name3的类型为:' + typeof name3 + '类型');
        var name4 = null;
        console.log('name4的类型为:' + typeof name4 + '类型');
        var name5 = undefined;
        console.log('name5的类型为:' + typeof name5 + '类型');
    </script>
</body>
</html>